//
//  LSZSearchKeyContentManager.m
//  JKFuYinProject
//
//  Created by 九酷 on 2017/12/19.
//  Copyright © 2017年 LC. All rights reserved.
//

#import "LSZSearchKeyContentManager.h"

@implementation LSZSearchKeyContentManager
-(id)initWithSearchKeyContent :(NSDictionary *)dic
{
    self = [super init];
    if (self) {
        self.mutMgArray  = [[NSMutableArray alloc]init];
        if ([[dic valueForKey:@"data"] isKindOfClass:[NSString class]]) {
            return self;
        }
        if ([[dic valueForKey:@"data"] isKindOfClass:[NSNumber class]]) {
            return self;
        }
        if (![dic valueForKey:@"data"]) {
            return self;
        }
        NSArray * arrayData = dic[@"data"];
        NSMutableArray * arrayMg = [[NSMutableArray alloc]init];
        for (NSDictionary * diction in  arrayData) {
            LSZSearchKeyContentMg * manager = [[LSZSearchKeyContentMg alloc]init];
            manager.id_id      = NullStringjudgment(NSStr(diction[@"id"]));
            manager.shareUrl   = NullStringjudgment(NSStr(diction[@"shareUrl"]));
            manager.title      = NullStringjudgment(NSStr(diction[@"title"]));
            manager.duration   = NullStringjudgment(NSStr(diction[@"duration"]));
            manager.browseNum  = NullStringjudgment(NSStr(diction[@"browseNum"]));
            if([diction objectForKey:@"type"]){
                manager.type      = NullStringjudgment(NSStr(diction[@"type"]));
            }
            if([diction objectForKey:@"remoteUrl"]){
                manager.remoteUrl = NullStringjudgment(NSStr(diction[@"remoteUrl"]));
            }
            if([diction objectForKey:@"imageUrl"]){
                manager.imageUrl  = NullStringjudgment(NSStr(diction[@"imageUrl"]));
            }
            if([diction objectForKey:@"commentNum"]){
                manager.commentNum= NullStringjudgment(NSStr(diction[@"commentNum"]));
            }
            if([diction objectForKey:@"praiseNum"]){
                manager.praiseNum = NullStringjudgment(NSStr(diction[@"praiseNum"]));
            }
            if([diction objectForKey:@"update"]){
                manager.update    = NullStringjudgment(NSStr(diction[@"update"]));
            }
            if([diction objectForKey:@"source"]){
                manager.source    = NullStringjudgment(NSStr(diction[@"source"]));
            }
            if([diction objectForKey:@"content"]){
                manager.content   = NullStringjudgment(NSStr(diction[@"content"]));
            }
            if([diction objectForKey:@"album"]){
                manager.album     = NullStringjudgment(NSStr(diction[@"album"]));
            }
            if([diction objectForKey:@"fileUrl"]){
                manager.fileUrl   = NullStringjudgment(NSStr(diction[@"fileUrl"]));
            }
            if([diction objectForKey:@"singerName"]){
                manager.singerName = NullStringjudgment(NSStr(diction[@"singerName"]));
            }
            if([diction objectForKey:@"parentId"]){
                manager.parentId = NullStringjudgment(NSStr(diction[@"parentId"]));
            }
            [arrayMg addObject:manager];
        }
        self.mutMgArray = arrayMg;
    }
    return self;
}
@end

@implementation LSZSearchKeyContentMg
@end

